package moodish.comm;

import static org.junit.Assert.*;

import moodish.comm.ServerSideMessage.Type;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class ServerSideTest {
	
	private ServerSide server;
	private String nickName;
	private String payload;
	private Type type;

	@Before
	public void setUp() throws Exception {
		server = new ServerSide("Grupo16", null, Type.CLIENT_CONNECTED);
	}

	@After
	public void tearDown() throws Exception {
		server = null;
	}

	@Test
	public void testServerSide() {
		nickName = "Grupo16";
		payload = null;
		type = Type.CLIENT_CONNECTED;
	}

	@Test
	public void testGetType() {
		assertEquals(Type.CLIENT_CONNECTED, server.getType());
	}

	@Test
	public void testGetPayload() {
		assertEquals(null, server.getPayload());
	}

	@Test
	public void testGetClientNickname() {
		assertEquals("Grupo16", server.getClientNickname());
	}

}
